package org.tea.inventory.job;

import lombok.extern.slf4j.Slf4j;
import org.quartz.*;
import org.springframework.scheduling.quartz.QuartzJobBean;

import java.time.LocalDateTime;

/**
 * @author hanzy
 * @description
 * @date 2023年07月12日 13:29
 */
@Slf4j
@PersistJobDataAfterExecution
@DisallowConcurrentExecution
public class ActCouponStartJob extends QuartzJobBean {
    @Override
    protected void executeInternal(JobExecutionContext arg0) throws JobExecutionException {
        log.info(LocalDateTime.now() + "活动定时开始执行");
        // 获取参数
        JobDataMap jobDataMap = arg0.getJobDetail().getJobDataMap();
        // 业务逻辑 ...
        Long id = jobDataMap.getLong("id");
    }
}
